{extend name='extra@admin/content'}
{block name="button"}
{/block}
{block name="content"}
<blockquote class="layui-elem-quote layui-quote-nm text-center">订单信息</blockquote>
<table class="layui-table" lay-skin="line" lay-size="sm">
    <thead>
    <tr>
        <th class='text-left nowrap'>订单ID</th>
        <th class='text-left nowrap'>订单编号</th>
        <th class='text-left nowrap'>会员姓名</th>
        <th class='text-left nowrap'>联系电话</th>
        <th class='text-left nowrap'>订单金额</th>
        <th class='text-left nowrap'>订单状态</th>
        <th class='text-left nowrap'>下单时间</th>
        <th class='text-left nowrap'>支付方式</th>
        <th class='text-left nowrap'>支付时间</th>
    </tr>
    </thead>
    <tbody>
    <tr>
        <td class='text-left nowrap'>
            {$info.id}
        </td>
        <td class='text-left nowrap'>
            {$info.order_sn}
        </td>
        <td class='text-left nowrap'>
            {$info.realname}
        </td>
        <td class='text-left nowrap'>
            {$info.mobile}
        </td>
        <td class='text-left nowrap'>
            {$info.final_amount}
        </td>
        <td class='text-left nowrap'>
            {if condition="$info.order_status eq 0"}未支付
            {elseif condition="$info.order_status eq 1"}已支付
            {elseif condition="$info.order_status eq 2"}已确认
            {elseif condition="$info.order_status eq 3"}已发货
            {elseif condition="$info.order_status eq 4"}已收货
            {elseif condition="$info.order_status eq 5"}退货申请中
            {elseif condition="$info.order_status eq 6"}退货已处理
            {elseif condition="$info.order_status eq 7"}订单已完成
            {/if}
        </td>
        <td class='text-left nowrap'>
            {$info.addtime|date="Y-m-d H:i:s",###}
        </td>
        <td class='text-left nowrap'>
            {if condition="$info.pay_type eq 1"}
            支付宝
            {elseif condition="$info.pay_type eq 2"}
            微信支付
            {elseif condition="$info.pay_type eq 3"}
            余额
            {elseif condition="$info.pay_type eq 4"}
            现金
            {elseif condition="$info.pay_type eq 5"}
            银行卡
            {/if}
        </td>
        <td class='text-left nowrap'>
            {$info.pay_time|date="Y-m-d H:i:s",###}
        </td>
    </tr>
    </tbody>
</table>
<blockquote class="layui-elem-quote layui-quote-nm text-center">付款信息</blockquote>

<table class="layui-table" lay-skin="line" lay-size="sm">
    <thead>
    <th class='text-left nowrap'>优惠券抵扣</th>
    <th class='text-left nowrap'>应付</th>
    <th class='text-left nowrap'>实付（找零前）</th>
    <th class='text-left nowrap'>退款</th>
    </tr>
    </thead>
    <tbody>
    <tr>
        <td class='text-left nowrap'>
            ￥{$info.coupon_price}
        </td>
        <td class='text-left nowrap'>
            ￥{$info.final_amount}
        </td>
        <td class='text-left nowrap'>
            ￥{$info.receive_amount}
        </td>
        <td class='text-left nowrap'>
            ￥{$info.tuihuo_amount}
        </td>
    </tr>
    </tbody>
</table>

<blockquote class="layui-elem-quote layui-quote-nm text-center">商品详情</blockquote>

<table class="layui-table" lay-skin="line" lay-size="sm">
    <thead>
    <tr>
        <th class='text-left nowrap'>商品</th>
        <th class='text-left nowrap'>购买数量</th>
        <th class='text-left nowrap'>属性</th>
        <th class='text-left nowrap'>总价</th>
        <th class='text-left nowrap'>状态</th>
        <th class='text-left nowrap'>退货信息</th>
        <th class='text-left nowrap'>退货数量</th>
        <th class='text-left nowrap'>操作</th>
    </tr>
    </thead>
    <tbody>
    {volist name='list' id='vo'}
    <tr>
        <td class='text-left nowrap'>
            {$vo.name}
        </td>
        <td class='text-left nowrap'>
            {$vo.anum}
        <td class='text-left nowrap'>
            {$vo.title}
        </td>
        <td class='text-left nowrap'>
            {$vo.amount}
        </td>
        <td class='text-left nowrap'>
            {if condition="$vo.status eq 0"}未支付
            {elseif condition="$vo.status eq 1"}已支付
            {elseif condition="$vo.status eq 2"}已确认
            {elseif condition="$vo.status eq 3"}已发货
            {elseif condition="$vo.status eq 4"}已收货
            {elseif condition="$vo.status eq 5"}退货申请中
            {elseif condition="$vo.status eq 6"}退货已处理
            {elseif condition="$vo.status eq 7"}订单已完成
            {/if}
        </td>
      </td>
      <td class='text-left nowrap'>
            {if $vo.atuihuo == 0}
            无
            {elseif $vo.atuihuo == 1}
            全部退货
            {else/}
            部分退货
            {/if}
        </td>
        <td class='text-left nowrap'>
            {$vo.tuihuo_num}
        </td>
        <td class='text-left nowrap'>
            {if auth("$classuri/cancel") && $vo.atuihuo == 0}
            <span class="text-explode">|</span>
            <a data-modal='{:url("$classuri/cancel")}?id={$vo.aid}' href="javascript:void(0)"
               data-title="退货-{$vo.name} {$vo.title}">退货</a>
            {/if}
        </td>
    </tr>
    {/volist}
    </tbody>
</table>
<blockquote class="layui-elem-quote layui-quote-nm text-center">操作记录</blockquote>
<table class="layui-table" lay-skin="line" lay-size="sm">
    <thead>
    <tr>
        <th class='text-left nowrap'>时间</th>
        <th class='text-left nowrap'>描述</th>
        <th class='text-left nowrap'>操作者</th>
    </tr>
    </thead>
    <tbody>
    {volist name='action' id='va'}
    <tr>
        <td class='text-left nowrap'>
            {$va.addtime|date="Y-m-d H:i:s",###}
        </td>
        <td class='text-left nowrap'>
            {$va.status_desc}
        </td>
        <td class='text-left nowrap'>
            {if condition="$va.username eq ''"}会员{else /}{$va.username}{/if}
        </td>
    </tr>
    {/volist}
    </tbody>
</table>
{if isset($page)}<p>{$page}</p>{/if}
<script>
    window.laydate.render({range: true, elem: '#range-date', format: 'yyyy/MM/dd'});
</script>
{/block}